package cn.easy.rpc.context;

import cn.easy.rpc.core.ServiceRegistrar;
import lombok.Data;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author zwb
 * @create 2020-09-17 21:21
 **/
@Data
public class RpcContext {

    private static class InstanceHolder{
        private static RpcContext rpcContext = new RpcContext();
    }

    public static RpcContext getInstance(){
        return InstanceHolder.rpcContext;
    }

    /**
     * 是否为服务提供者
     */
    private boolean isProducer;

    /**
     * 服务列表
     */
    private CopyOnWriteArrayList<ServiceRegistrar> dependService;

}
